import java.util.Scanner;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class code4 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int t = in.nextInt();
        while (t-- != 0) {
            int n = in.nextInt();
            boolean[][] hash = new boolean[n][26];
            //记录每个字符串的字符
            for (int i = 0; i < n; i++) {
                char[] ss = in.next().toCharArray();
                for (int j = 0; j < ss.length; j++) {
                    hash[i][ss[j] - 'a'] = true;
                }
            }
            //前后指针找
            int left = 0;
            int right = n - 1;
            int ret = 0;
            while (left < right) {
                if(!check(hash,left,right)) break;
                left++;
                right--;

            }
            if (left < right) {
                System.out.println("No");
            } else {
                System.out.println("Yes");
            }
        }
    }

    public static boolean check(boolean[][] hash,int left,int right) {
        for (int i = 0; i < 26; i++) {
            if (hash[left][i] && hash[right][i]) {
                return true;
            }
        }
        return false;
    }
}